<?php
/**
 * 验证码
 * 仲伟涛 2011-3
 */
class Resume_Page_CheckCode extends Resume_Page_Abstract
{
    public function validate(ME_Request $input, ME_Response $output)
    {
        $input->checkCodeHidden = (int)$input->get("ck");
        return true;
    }
    public function doDefault(ME_Request $input, ME_Response $output)
    {
        /*
        $checkCode   = new ME_Seccode();
        $authKey     = $checkCode->getAuthKey();
		$seccode     = ME_String::authCode($input->checkCodeHidden, 'DECODE', $authKey);
        */
        $seccode = $input->checkCodeHidden - 10;
		@header("Expires: -1");
		@header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
		@header("Pragma: no-cache");
		$code = new ME_Seccode();
		$code->code = $seccode;
		$code->type = 0;
		$code->width = 70;
		$code->height = 21;
		$code->background = 0;
		$code->adulterate = 1;
		$code->ttf = 1;
		$code->angle = 0;
		$code->color = 1;
		$code->size = 0;
		$code->shadow = 1;
		$code->animator = 0;
		$code->fontpath = SYSTEM_VAR . 'images/fonts/';
		$code->datapath = SYSTEM_VAR . 'images/';
		$code->includepath = '';
		$code->display();
        exit;
    }

}
